Skip to main content

All Questions

3votes
1answer
363views

Python function to find the count of digits of numerals in base n up to a given limit

This is a simple exercise to find the count of digits of all numerals in a given base up to a given limit (not including the limit), I wrote it to determine the ratio of bytes saved when the numbers ...
Ξένη Γήινος's user avatar
1vote
0answers
181views

Applied Solution Based On Polya Enumeration Theorem

Problem A function solution(w, h, s) that takes 3 integers and returns the number of unique, non-equivalent configurations that can be found on a grid w blocks wide, h blocks tall and s possible ...
Anit Shrestha's user avatar
2votes
2answers
175views

Project Euler, Problem 273: finding perfect-square partitions

Problem: Consider equations of the form: \$a^2 + b^2 = N; 0 \leq a \leq b; a, b, N \in \mathbb{N}\$. For \$N=65\$ there are two solutions: \$a=1, b=8\$ and \$a=4, b=7\$. We call \$S(N)...
Alex Hal's user avatar
9votes
3answers
1kviews

Balanced centrifuge configurations

Given an input N as the size of a centrifuge, I need to find out the number of balanced configurations. The full description is here. Centrifuge is a piece of ...
Kristada673's user avatar
6votes
1answer
1kviews

Navigating over a square spiral

I recently found adventofcode, but when I solved Day 3 in Python, I noticed that my code isn't looking very nice. The challenge is about navigating a hypothetical memory laid out in a square spiral: ...
Maya's user avatar
  • 163
4votes
3answers
310views

Time Limit Exceeded for ETF - Euler Totient Function at Spoj

In number theory, the totient φ of a positive integer n is defined to be the number of positive integers less than or equal to n that are coprime to n. Given an integer n (1 ≤ n ≤ 106), compute the ...
sarvajeetsuman's user avatar

close